package com.will;

import com.will.client.NettyClient;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import sun.nio.ch.Net;

import javax.annotation.Resource;

@SpringBootApplication
@ComponentScan(basePackages= {"com.will"})
public class IboxClientApplication implements CommandLineRunner {

    @Resource
    private NettyClient nettyClient;

//    @Bean
//    public ServletRegistrationBean jerseyServlet() {
//        ServletRegistrationBean registration = new ServletRegistrationBean(new ServletContainer(), "/*");
//        // our rest resources will be available in the path /rest/*
//        registration.addInitParameter(ServletProperties.JAXRS_APPLICATION_CLASS, JerseyConfig.class.getName());
//        return registration;
//
//    }


    public static void main(String[] args) {
        SpringApplication.run(IboxClientApplication.class, args);
    }

    @Override
    public void run(String... args) {
        nettyClient.run();
    }

}

